{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form action="index.php" method="get">	
                <div class="box-header with-border">
                    <span class="fa fa-edit (alias)" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">成绩录入</p>
                </div>
                <div class="box-body">
                      <div class="form-group">
						  <label class="col-md-3 control-label  text-right" >
							   考试分类：
						  </label>
						  <div class="input-group col-md-4 col-sm-12 col-xs-12">
							    <select class="form-control" name="exam_type" id="exams" onchange="exam()">
                                     <option value="">请选择</option>
									{%foreach from=$exam_lists key=key item=value%}
                                     <option value="{%$key%}">{%$value.name%}</option>
									{%/foreach%}
                                </select>
						   </div> 
				      </div>
					  {%foreach from=$exam_lists key=key item=value%}
                      <div class="form-group tea" id="ex{%$key%}">
						  <label class="col-md-3 control-label  text-right" >
							   考试名称：
						  </label>
						  <div class="input-group col-md-6 col-sm-10 col-xs-12">
								{%foreach from=$value.exam key=k item=v%}
							    <label class="choice"><input type="radio" name="exam_id" value="{%$k%}"> {%$v%}</label>
								{%/foreach%}
						   </div> 
				      </div>
					  {%/foreach%}
                       <div class="form-group">
						  <label class="col-md-3 control-label text-right" >
							   班级名称：
						  </label>
						  <div class="input-group col-md-4 col-sm-4 col-xs-12">
							   <select class="form-control" name="class_id">
							   {%foreach from=$class_lists key=key item=value%}
                                    <option value="{%$value.class_id%}"> {%$value.class_name%}</option>
								{%/foreach%}
                               </select> 
						  </div> 
				      </div>
                       <div class="form-group">
						  <label class="col-md-3 control-label text-right" >
							   科目名称：
						  </label>
						  <div class="input-group col-md-4 col-sm-4 col-xs-12">
							   <select class="form-control" name="subject_id">
							   {%foreach from=$subject_lists key=key item=value%}
                                    <option value="{%$value.subject_id%}"> {%$value.subject_name%}</option>
								{%/foreach%}
                               </select> 
						  </div> 
				      </div>    
				</div><!--box-body -->
                <div class="box-footer text-center">
					<input type="hidden" name="a" value="score.add">
                    <button type="submit" class="btn btn-primary ">  成绩录入</button>
                </div>
              </form>
           </div><!--box box-default box-solid-->
         </section>   
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
   <script type="text/javascript">
        $(document).ready(function(){
            $(".tea").hide();
        });
        function exam()
        {
			$(".tea").hide();
            var val = $("#exams").val();
			$("#ex"+val).show();
        }
    </script>
</body>
</html>

